Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(libsinsp/test): use GTEST_SKIP to track disabled tests #2158

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

therealbobo
Copy link
Contributor

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind feature

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area API-version

/area build

/area CI

/area driver-kmod

/area driver-bpf

/area driver-modern-bpf

/area libscap-engine-bpf

/area libscap-engine-gvisor

/area libscap-engine-kmod

/area libscap-engine-modern-bpf

/area libscap-engine-nodriver

/area libscap-engine-noop

/area libscap-engine-source-plugin

/area libscap-engine-savefile

/area libscap

/area libpman

/area libsinsp

/area tests

/area proposals

Does this PR require a change in the driver versions?

/version driver-API-version-major

/version driver-API-version-minor

/version driver-API-version-patch

/version driver-SCHEMA-version-major

/version driver-SCHEMA-version-minor

/version driver-SCHEMA-version-patch

What this PR does / why we need it:

Instead of using an ifdef around test functions, we could use GTEST_SKIP to avoid losing sight of disabled tests.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

Copy link

codecov bot commented Nov 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.20%. Comparing base (a339e9d) to head (78bb159).
Report is 40 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2158      +/-   ##
==========================================
+ Coverage   75.04%   75.20%   +0.15%     
==========================================
  Files         255      259       +4     
  Lines       33589    33890     +301     
  Branches     5739     5801      +62     
==========================================
+ Hits        25207    25487     +280     
- Misses       8382     8403      +21     
Flag Coverage Δ
libsinsp 75.20% <ø> (+0.15%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

github-actions bot commented Nov 13, 2024

Perf diff from master - unit tests

     7.66%     -0.74%  [.] sinsp_evt::get_type
     9.52%     +0.61%  [.] sinsp::next
     6.18%     -0.51%  [.] next_event_from_file
     2.75%     +0.45%  [.] sinsp_parser::process_event
     1.44%     -0.39%  [.] libsinsp::sinsp_suppress::process_event
     4.45%     -0.38%  [.] gzfile_read
     3.91%     -0.36%  [.] sinsp_evt::load_params
     0.78%     +0.34%  [.] sinsp_evt::get_direction
     1.82%     +0.34%  [.] next
     1.92%     -0.34%  [.] sinsp_evt_filter::sinsp_evt_filter

Heap diff from master - unit tests

peak heap memory consumption: 0B
peak RSS (including heaptrack overhead): 0B
total memory leaked: 0B

Heap diff from master - scap file

peak heap memory consumption: 0B
peak RSS (including heaptrack overhead): 0B
total memory leaked: 0B

Benchmarks diff from master

Comparing gbench_data.json to /root/actions-runner/_work/libs/libs/build/gbench_data.json
Benchmark                                                         Time             CPU      Time Old      Time New       CPU Old       CPU New
----------------------------------------------------------------------------------------------------------------------------------------------
BM_sinsp_split_mean                                            +0.0589         +0.0589           143           152           143           152
BM_sinsp_split_median                                          +0.0596         +0.0595           143           152           143           152
BM_sinsp_split_stddev                                          +4.5987         +4.5894             0             1             0             1
BM_sinsp_split_cv                                              +4.2872         +4.2785             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_mean                  +0.0902         +0.0902            57            62            57            62
BM_sinsp_concatenate_paths_relative_path_median                +0.0931         +0.0931            56            62            56            62
BM_sinsp_concatenate_paths_relative_path_stddev                -0.6930         -0.6928             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_cv                    -0.7184         -0.7182             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_mean                     +0.0480         +0.0480            24            25            24            25
BM_sinsp_concatenate_paths_empty_path_median                   +0.0486         +0.0486            24            25            24            25
BM_sinsp_concatenate_paths_empty_path_stddev                   -0.6813         -0.6817             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_cv                       -0.6959         -0.6963             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_mean                  +0.1092         +0.1092            56            62            56            62
BM_sinsp_concatenate_paths_absolute_path_median                +0.1074         +0.1074            55            61            55            61
BM_sinsp_concatenate_paths_absolute_path_stddev                +0.8350         +0.8361             1             1             1             1
BM_sinsp_concatenate_paths_absolute_path_cv                    +0.6543         +0.6554             0             0             0             0
BM_sinsp_split_container_image_mean                            +0.0349         +0.0349           386           399           386           399
BM_sinsp_split_container_image_median                          +0.0360         +0.0360           386           400           386           400
BM_sinsp_split_container_image_stddev                          +0.6590         +0.6588             3             5             3             5
BM_sinsp_split_container_image_cv                              +0.6030         +0.6028             0             0             0             0

@FedeDP
Copy link
Contributor

FedeDP commented Nov 13, 2024

/milestone 0.20.0

Left a suggestion/fix :)

@poiana poiana added this to the 0.20.0 milestone Nov 13, 2024
@therealbobo therealbobo force-pushed the therealbobo-skip-flaky-tests branch from d687fa6 to b343396 Compare November 13, 2024 10:13
FedeDP
FedeDP previously approved these changes Nov 28, 2024
Copy link
Contributor

@FedeDP FedeDP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@poiana
Copy link
Contributor

poiana commented Nov 28, 2024

LGTM label has been added.

Git tree hash: 9e848f1b7055baf0cc8932454db421995de107c8

@poiana
Copy link
Contributor

poiana commented Nov 28, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: FedeDP, therealbobo

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@FedeDP
Copy link
Contributor

FedeDP commented Nov 28, 2024

Uh system deps builds on arm64 are failing with:

/__w/libs/libs/userspace/libsinsp/test/async_key_value_source.ut.cpp:341:2: error: 'GTEST_SKIP' was not declared in this scope
  GTEST_SKIP() << R"(This test usually fails like this when runned with sanitizers on arm64:

Care to give it a look so that we can merge this one?
I think it depends by the gtest version provided by github-arm64-2c-8gb runner :/

@poiana
Copy link
Contributor

poiana commented Nov 28, 2024

New changes are detected. LGTM label has been removed.

@@ -17,6 +17,8 @@ jobs:
build-libs-linux:
name: build-libs-linux-${{ matrix.arch }} 😁 (${{ matrix.name }})
runs-on: ${{ (matrix.arch == 'arm64' && 'github-arm64-2c-8gb') || 'ubuntu-22.04' }}
container:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@therealbobo therealbobo force-pushed the therealbobo-skip-flaky-tests branch from cc3566c to 546b202 Compare December 6, 2024 14:08
@@ -17,6 +17,8 @@ jobs:
build-libs-linux:
name: build-libs-linux-${{ matrix.arch }} 😁 (${{ matrix.name }})
runs-on: ${{ (matrix.arch == 'arm64' && 'github-arm64-2c-8gb') || 'ubuntu-22.04' }}
container:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At this point, do we even need the container? I mean, we already run on ubuntu-22.04 on x86 and arm64.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd remove the container directive.
Also, remember to add sudo before install deps steps

@therealbobo therealbobo force-pushed the therealbobo-skip-flaky-tests branch 4 times, most recently from d666250 to 120c24e Compare December 6, 2024 14:43
@therealbobo therealbobo force-pushed the therealbobo-skip-flaky-tests branch from 120c24e to 78bb159 Compare December 6, 2024 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants